package br.com.schs.util;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

import br.com.schs.entity.Departamento;

public class DepartamentoConverter implements Converter {

	@Override
	public Object getAsObject(FacesContext facesContext, UIComponent component, String valor) {
		Departamento departamento = new Departamento();
		departamento.setDepartamento(valor);
		return departamento;
	}

	@Override
	public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object valor) {
		return valor.toString();
	}

}
